package com.regent.central.bill.repository;

import com.regent.central.bill.core.ReturnGoodsRemark;
import com.regent.central.bill.dto.sale_order.SaleOrderDetailReturnGoodsRemarkDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface ReturnGoodsRemarkMapper extends Mapper<ReturnGoodsRemark> {

    /**
     * 获取退货货品备注列表, 支持多个货品一起查询
     *
     * @param returnGoodsIds 退货货品ID数组
     * @return 退货货品备注列表
     */
    List<SaleOrderDetailReturnGoodsRemarkDTO> getSaleOrderDetailReturnGoodsRemarksIn(
            @Param("returnGoodsIds") String... returnGoodsIds
    );

    /**
     * 伪删除退货备注
     *
     * @param returnGoodsRemarkId 退货备注ID
     * @param userDeleted         删除人
     */
    void hide(
            @Param("returnGoodsRemarkId") String returnGoodsRemarkId,
            @Param("userDeleted") String userDeleted,
            @Param("timeDeleted") long timeDeleted
    );

    /**
     * 获取退货货品备注列表
     *
     * @param returnGoodsId 退货货品ID
     * @return 退货货品备注列表
     */
    List<ReturnGoodsRemark> getReturnGoodsRemarks(
            @Param("returnGoodsId") String returnGoodsId
    );

}